import request from '@/utils/request'

export function getGroupList() {
  return request({
    url: '/api/admin/group/list',
    method: 'get'
  });
}


export function addGroup(obj) {
  return request({
    url: '/api/admin/group',
    method: 'post',
    data: obj
  })
}


export function putGroup(id, obj) {
  return request({
    url: '/api/admin/group/' + id,
    method: 'put',
    data: obj
  })
}

export function fetchTree(query) {
  return request({
    url: '/api/admin/menu/getMenuTree ',
    method: 'get',
    params: query
  })
}
